function checkNull(){

	
	var username = document.getElementById("loginName").value;
	var userpwd = document.getElementById("loginPwd").value;
	if(username == null || username == ""){
		alert('请输入用户名');
		document.getElementById("loginName").focus();
		return false;
	}
	
	if(userpwd == null || userpwd == ""){
		alert('请输入密码');
		document.getElementById("loginPwd").focus();
		return false;
	}
	

	

	
}
//检测登陆验证码
function checkLogincode(obj){
	var code = obj.value;
	if(code == null || code == ""){
		document.getElementById("codeMsg").innerHTML = "<font color = red>验证码为空!</font>";
	}
	document.getElementById("codeMsg").innerHTML = "";

	checkCodeIsRight.CheckCode(code,callbackVCode);
}
function callbackVCode(data){
	if(!data){	
		document.getElementById("codeMsg").innerHTML = "<font color = red>验证码错误!</font>";			
	}
}
//密码初始化
function checkPwdInit(){
	var email = document.getElementById("email").value;
	var patrn=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;     
  	if (!patrn.exec(email))     
  	{   
  		alert('邮箱输入不合法');
  		document.getElementById("email").focus();
  		return false;   
  	}else{
  		if(window.confirm("确定初始化吗")){
  			document.getElementById("message").innerHTML = "正在发送邮件...";
  		}else{
  			return false;
  		}  		
  	} 
}
//推荐给朋友
function checktoFriend(){
	var email = document.getElementById("email").value;
	var patrn=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;     
  	if (!patrn.exec(email))     
  	{   
  		alert('邮箱输入不合法');
  		document.getElementById("email").focus();
  		return false;   
  	}else{
  		document.getElementById("message").innerHTML = "正在发送邮件...";
  	} 
}